package com.lagou.service.impl;

import com.lagou.service.HelloService;
import org.apache.dubbo.config.annotation.Service;
import org.apache.dubbo.rpc.RpcContext;

/**
 * @author czq
 * @date 2020/9/2 22:41
 */
@Service
public class HelloServiceImpl implements HelloService {

    @Override
    public String sayHello(String name) {
        System.out.println("当前请求的 ip 地址：" + RpcContext.getContext().getAttachment("clientIp"));
        return "hello " + name;
    }
}
